<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<title>Welcome</title>
	
	<style  type="text/css">
   body { 
    margin-top: 10%;
    margin-right: 30%; 
    margin-left: 30%;
      border: 2px solid black;
   }
 

   
  </style>
		
</h:head>
<h:body>
   <h:form>
	  
	  <p:panel header="Enter login and password:">
	       <h:panelGrid >
	           
	          	           
	           <p:messages id="messages" autoUpdate="true" closable="true" />  
	            
	           <h:panelGrid columns="2" cellspacing="8">
	                <p:outputLabel for="login" value="Login" />  
	                <p:inputText id="login" value="#{userBean.login}" required="true" /> 	    
	                            
	                <p:outputLabel for="pwd" value="Password" />  
	                <p:password id="pwd" value="#{userBean.password}" required="true" /> 
	           </h:panelGrid>
	    
	           <h:panelGroup>
	               <p:commandButton value="Register" action="register?faces-redirect=true" immediate="true"/>
	               <p:commandButton action="#{userBean.athorizate}" value="Login" ajax="false" />
	           </h:panelGroup>
	       </h:panelGrid>
	  </p:panel>
	   
   </h:form>
</h:body>
</html>